<template>
<!-- 底部标签栏tabbar -->
<van-tabbar v-model="active" fixed active-color='red' :route='true'>
    <van-tabbar-item icon="wap-home-o" to="/home">首页</van-tabbar-item>
    <van-tabbar-item icon="point-gift-o" to="/category">分类</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o" :info="allCountAndPrice.allCount" to="/shopcart">购物车</van-tabbar-item>
    <van-tabbar-item icon="user-o" to="/user">我的</van-tabbar-item>
</van-tabbar>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    data() {
        return {
            active: 0
        }
    },
    computed:mapGetters(['allCountAndPrice'])
    // computed:{
    //     allCount(){
    //         return this.$store.getters.allCountAndPrice.allCount
    //     }
    // }
}
</script>

<style>
</style>
